package com.eastfair.venuebooking.api;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.eastfair.boot.request.PageParams;
import com.eastfair.core.base.R;
import com.eastfair.venuebooking.vo.ExhibitionSpaceVO;
import com.eastfair.venueservice.dto.ExhibitionManageDTO;
import com.eastfair.venueservice.dto.ExhibitionManageQuery;
import com.eastfair.venueservice.dto.ServiceItemDTO;
import com.eastfair.venueservice.vo.ExhibitionManageVO;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * 展会Feign
 * @author linan
 */
@FeignClient(value = "venue-services-manage/exhibitionManage")
public interface ExhibitionManageFeign {

    /**
     * 同步展会
     *
     * @param exhibitionManageDTO exhibitionManageDTO
     * @return the r
     */
    @PostMapping("/syncExhibition")
    R<Boolean> syncExhibition(@RequestBody ExhibitionManageDTO exhibitionManageDTO);

    /**
     * 展会列表
     * @param exhibitionManageQuery exhibitionManageQuery
     * @return R<IPage<ExhibitionManageVO>>
     */
    @PostMapping("/queryExhibitionManage")
    R<IPage<ExhibitionManageVO>> queryExhibitionManage(@RequestBody PageParams<ExhibitionManageQuery> exhibitionManageQuery);

    /**
     * 展会列表(不分页)
     * @param exhibitionManageQuery exhibitionManageQuery
     * @return R<List<ExhibitionManageVO>>
     */
    @PostMapping("/queryAllExhibitionManage")
    R<List<ExhibitionManageVO>> queryAllExhibitionManage(@RequestBody ExhibitionManageQuery exhibitionManageQuery);

    /**
     * 展会ID查询展会场地
     *
     * @param exhibitionManageId the exhibition id
     * @return the r
     */
    @GetMapping("/exhibition/{exhibitionManageId}")
    R<List<ExhibitionSpaceVO>> queryByExhibitionManageId(@PathVariable("exhibitionManageId") Long exhibitionManageId);

    /**
     * 通过服务商查询进行中的展会
     *
     * @param exhibitionManageQuery 通过服务商查询进行中的展会
     * @return R
     */
    @PostMapping("/queryExhibitionManageByProvider")
    R<ExhibitionManageVO> queryExhibitionManageByProvider(@RequestBody ExhibitionManageQuery exhibitionManageQuery);
    /**
     * 查询展会详情
     *
     * @param exhibitionManageQuery 查询展会详情
     * @return R
     */
    @PostMapping("/queryExhibitionManageDetail")
    R<ExhibitionManageVO> queryExhibitionManageDetail(@RequestBody ExhibitionManageQuery exhibitionManageQuery);


    /**
     * 查询展会未同步的所有展会
     *
     * @return R
     */
    @ApiOperation(value = "查询展会未同步的所有展会", notes = "查询展会未同步的所有展会")
    @PostMapping("/queryNeedSyncExhibitionManage")
    R<List<ExhibitionManageVO>> queryNeedSyncExhibitionManage();

    /**
     * 展会同步回调
     *
     * @return R
     */
    @ApiOperation(value = "展会同步回调", notes = "展会同步回调")
    @PostMapping("/syncCallback")
    R<Boolean> syncCallback(@RequestBody List<Long> ids);
}
